package yh.design.strategy.impl;

import org.springframework.stereotype.Service;
import yh.design.annotation.PayStrategy;
import yh.design.common.payenum.Constants;
import yh.design.common.res.APIResult;
import yh.design.strategy.IPayment;
import yh.design.model.CashDTO;

import java.math.BigDecimal;


/**
 * 账户现金支付
 * @author: zyh
 * @date: 2025/4/5 21:57
 **/
@PayStrategy(pay = Constants.PayWayEnum.CASH_PAY)
@Service("cashPayment")
public class CashPayment implements IPayment<CashDTO> {


    @Override
    public APIResult executePay(CashDTO payInfo, BigDecimal payAmount) {
        //1.扣减账户余额
        System.out.println("扣减更新账户余额");
        //2.消费账单记录
        System.out.println("消费账单记录");
        return APIResult.success();
    }
}
